<?php

$routers = array(
	
	'home' => array(
		'/:page/',
		array(
			'controller' => 'index',
			'action' => 'index',
			'page' => null
		),
		array(
			'page' => '\d+'
		)
	),
	
	'404' => array(
		'/notfound/',
		array(
			'controller' => 'general',
			'action' => 'notfound',
		)
	),
	
	'randomWord' => array(
		'/random-word/',
		array(
			'controller' => 'index',
			'action' => 'randomWord',
		)
	),
	
	'addWord' => array(
		'/add-word/',
		array(
			'controller' => 'index',
			'action' => 'addWord',
		)
	),
	
	'card' => array(
		'/card/:id/',
		array(
			'controller' => 'index',
			'action' => 'cardById',
		),
		array(
			'id' => '\d+-.*'
		)
	),
	
	// MY MODULE
	
	
	'login' => array(
		'/login/',
		array(
			'module' => 'my',
			'controller' => 'index',
			'action' => 'login',
		)
	),
	
	'logout' => array(
		'/logout/',
		array(
			'module' => 'my',
			'controller' => 'index',
			'action' => 'logout',
		)
	),
	
	
	
	
	/* Vocabulary */
	'randomCart' => array(
		'/my/random-card/',
		array(
			'module' => 'my',
			'controller' => 'vocabulary',
			'action' => 'index',
		)
	),
	
	'addCard' => array(
		'/my/add-card/',
		array(
			'module' => 'my',
			'controller' => 'vocabulary',
			'action' => 'add',
		)
	),
	
	'editCard' => array(
		'/my/edit-card/:id/',
		array(
			'module' => 'my',
			'controller' => 'vocabulary',
			'action' => 'add',
		),
		array(
			'id' => '\d+-.*'
		)
	),
	
	
	'myCarts' => array(
		'/my/cards/',
		array(
			'module' => 'my',
			'controller' => 'vocabulary',
			'action' => 'list',
		)
	),
	
	'cardById' => array(
		'/my/card/:id/',
		array(
			'module' => 'my',
			'controller' => 'vocabulary',
			'action' => 'cardById',
		),
		array(
			'id' => '\d+-.*'
		)
	),
	
	
	
);